package cn.ekgc.scalademo1

object Demo3 extends App {
  // "1" increment 3  => "4"

  implicit class MyString(s:String){
    def increment(n:Int):String = {
      (s.toInt + n).toString
    }
  }


  var s = "1"

  var s2 = s increment 3  // s => (new MyString(s)).increment(s)

  println(s2)

  2 to 10

}
